package com.lcj.bff.driver.feign;

import com.lcj.bff.driver.controller.form.DriverIdForm;
import com.lcj.bff.driver.controller.form.MessageIdForm;
import com.lcj.bff.driver.controller.form.SearchMessageByPageForm;
import com.lcj.bff.driver.controller.form.SendPrivateMessageForm;
import com.lcj.common.util.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;

@FeignClient(value = "aoch-snm")
public interface SnmServiceApi {

    /**
     * 清空司机订单队列
     * @param form
     * @return
     */
    @PostMapping("/message/order/new/clearNewOrderQueue")
    public Result clearNewOrderQueue(DriverIdForm form);

    /**
     * 接受新订单消息
     * @param form
     * @return
     */
    @PostMapping("/message/order/new/receiveNewOrderMessage")
    public Result receiveNewOrderMessage(DriverIdForm form);

    /**
     * 同步发送私有消息
     * @param form
     * @return
     */
    @PostMapping("/message/sendPrivateMessage")
    public Result sendPrivateMessage(SendPrivateMessageForm form);

    /**
     * 异步发送私有消息
     * @param form
     * @return
     */
    @PostMapping("/message/sendPrivateMessageSync")
    public Result sendPrivateMessageSync(SendPrivateMessageForm form);

    /**
     * 分页查询消息
     * @param form
     * @return
     */
    @PostMapping("message/searchMessageByPage")
    public Result searchMessageByPage(SearchMessageByPageForm form);

    @PostMapping("message/searchMessageById")
    public Result searchMessageById(MessageIdForm form);

    @PostMapping("message/updateUnreadMessage")
    public Result updateUnreadMessage(MessageIdForm form);

    @PostMapping("message/deleteMessageRefById")
    public Result deleteMessageRefById(MessageIdForm form);

}